﻿using Md.Demo.Service;
using System;
using System.Threading.Tasks;
using static Md.Demo.Service.Greeter;

namespace Md.Demo.Rpc
{
    public class TestRpc
    {
        private readonly GreeterClient _greeterClient;
        public TestRpc(GreeterClient greeterClient)
        {
            _greeterClient = greeterClient;
        }

        public async Task<HelloReply> TestSend()
        {
            var reply = await _greeterClient.SayHelloAsync(
                new HelloRequest { Name = "大卫" });
            return reply;
        }
    }
}
